/*
 * @Author: cest
 * @Date: 2022-08-08 10:33:04
 * @LastEditTime: 2022-08-09 18:11:11
 * @LastEditors: cest
 * @FilePath: /nuxt3-vite/unocss.config.ts
 * @Description: 编辑描述内容
 */
import {
  defineConfig,
  presetAttributify,
  presetIcons,
  presetTypography,
  presetUno,
  // presetWebFonts,
  transformerDirectives,
  transformerVariantGroup,
} from 'unocss'

export default defineConfig({
  // 自定义组合样式
  shortcuts: [
    ['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
    ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
  ],
  presets: [
    // 工具类预设
    presetUno(),
    // presetAttributify 属性化模式支持
    presetAttributify(),
    // presetIcons Icon 图标预设
    presetIcons({
      scale: 1.2,
    }),
    // 预设排版
    presetTypography(),
    // presetWebFonts({
    //   fonts: {
    //     sans: 'DM Sans',
    //     serif: 'DM Serif Display',
    //     mono: 'DM Mono',
    //   },
    // }),
  ],
  transformers: [
    transformerDirectives(),
    transformerVariantGroup(),
  ],
})
